package com.gupaoedu.design.template.task.factory;

import com.gupaoedu.design.template.task.entity.*;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2018/3/14.
 */
public class PersonFactory extends CompanyFactory {

    public Person projectManagerWork(ApplyHoliday holiday) {
        ProjectManager manager = ProjectManager.newInstance();
        manager.setuId(1);
        manager.setName("张三");
        manager.setRole("项目经理");
        holiday.setCurrentProcess("项目经理");
        holiday.setCode(2);
        manager.setHoliday(holiday);
        return manager;
    }

    public Person departmentManagerWork(ApplyHoliday holiday) {
        DepartmentManager manager = DepartmentManager.newInstance();
        manager.setuId(2);
        manager.setName("李四");
        manager.setRole("部门经理");
        holiday.setCurrentProcess("部门经理");
        holiday.setCode(1);
        manager.setHoliday(holiday);
        return manager;
    }

    public Person personnelManagerWork(ApplyHoliday holiday) {
        PersonnelManager manager = PersonnelManager.newInstance();
        manager.setuId(3);
        manager.setName("王五");
        manager.setRole("人事经理");
        holiday.setCurrentProcess("人事经理");
        holiday.setCode(1);
        manager.setHoliday(holiday);
        return manager;
    }
}
